namespace Repositories.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addCollectInvoiceUpdaterFied : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.CollectInvoice", "UpdaterId", c => c.Int());
            AddColumn("dbo.CollectInvoice", "UpdaterName", c => c.String());
            AddColumn("dbo.CollectInvoice", "UpdateTime", c => c.DateTime());
            CreateIndex("dbo.CollectInvoice", "UpdaterId");
            AddForeignKey("dbo.CollectInvoice", "UpdaterId", "dbo.User", "ID");
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.CollectInvoice", "UpdaterId", "dbo.User");
            DropIndex("dbo.CollectInvoice", new[] { "UpdaterId" });
            DropColumn("dbo.CollectInvoice", "UpdateTime");
            DropColumn("dbo.CollectInvoice", "UpdaterName");
            DropColumn("dbo.CollectInvoice", "UpdaterId");
        }
    }
}
